<template>
  <el-col>
    <el-form-item :label="`${setI18n('setting.lang.label')}：`">
      <xt-radio v-model="language" @change="changeLanguage" :options="langOptions" />
    </el-form-item>
  </el-col>
</template>

<script lang="ts">
export default {
  name: "SettingLanguage",
};
</script>

<script lang="ts" setup>
import { ref } from "vue";
import { useLocalI18n } from "@/locales/i18n";

const { changeLanguage, langOptions, setI18n } = useLocalI18n();

const language = ref(window.sessionStorage.getItem("LANGUAGE") || "zh-cn");
</script>
